def get_triangle(n):
    
    if n < 2:
        return "error, can't form a triangle"
    else:
        print("=\t" * (n//2) + "up triangle" + "=\t" * (n//2))
        print("\n" * 2)

        for i in range(1,n+1):
            print('\t' * (n - i),end='')
            for j in range(i,0,-1):
                print('%d' % j,end='\t')

            print()
        
        print("\n" * 2)
        print("=\t" * (n//2) + "down triangle" + "=\t" * (n//2))
        print("\n" * 2)

        for i in range(n, 0, -1):
            print('\t' * (n - i),end='')
            for j in range(i, 0, -1):
                print(j, end='\t')
            print()


get_triangle(15)


# 空隙太大了
